From: Jasper St. Pierre Date: Thu, 16 Aug 2012 17:39:34 +0000 (-0400) Subject: messageTray: Be able to "switch" notifications X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~6135 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=1fd17b5027203546e236d56d82258be241074c66;p=gnome-shell.git messageTray: Be able to "switch" notifications If you click on a summary item while another is up, we should swap without an extra click. --- diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index f77471660..a52702a93 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -1633,10 +1633,8 @@ const MessageTray = new Lang.Class({ _onSummaryItemClicked: function(summaryItem, button) { if (summaryItem.source.handleSummaryClick()) { this._setClickedSummaryItem(null); - } else if (!this._clickedSummaryItem) { - this._setClickedSummaryItem(summaryItem, button); } else { - this._setClickedSummaryItem(null); + this._setClickedSummaryItem(summaryItem, button); } this._updateState(); @@ -2277,9 +2275,11 @@ const MessageTray = new Lang.Class({ _onSummaryBoxPointerUngrabbed: function() { this._summaryBoxPointerState = State.HIDING; - this._setClickedSummaryItem(null); this._unlock(); + if (this._summaryBoxPointerItem == this._clickedSummaryItem) + this._setClickedSummaryItem(null); + if (this._summaryBoxPointerItem.source.notifications.length == 0) { this._summaryBoxPointer.actor.hide(); this._hideSummaryBoxPointerCompleted();